﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;

namespace Battle
{
    public partial class SettingsForm : Form
    {
        public SoundPlayer soundPlayerSettings = new SoundPlayer(Resource1.settings);
        public SoundPlayer soundPlayerMain = new SoundPlayer(Resource1.Ocean);

        public SettingsForm()
        {
            InitializeComponent();
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;            
            soundPlayerSettings.PlayLooping();          
        }

        private void button1_Click(object sender, EventArgs e)
        {     
            soundPlayerMain.PlayLooping();
            new MainForm(this).Show();
            this.Hide();

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void textBox1_MouseClick(object sender, MouseEventArgs e)
        {
            textBox1.Text = "";
            this.textBox1.ForeColor = System.Drawing.Color.White;
        }

        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                soundPlayerMain.PlayLooping();
                new MainForm(this).Show();
                this.Hide();
            }
        }        
    }
}
